<template>
  <div class="nice">
    <h2>{{info}}</h2>
    <h3>歌手姓名：{{ name }}</h3>
    <h3>性别：{{ sex }}</h3>
    <h3>出生年份：{{ birthDate }}</h3>
    <h3>身高：{{ myHeight }}</h3>
    <button @click="updateHieght">点击修改身高</button>
  </div>
</template>

<script>
export default {
  name: "Singer",
  data() {
    console.log(this);
    return {
      info: "歌手信息介绍",
      // 使用自定义字段来接收父组件传递的数据
      myHeight: this.height
    }
  },
  methods:{
    updateHieght(){
      console.log("this.height=",this.height);
      this.myHeight ++;
    }
  },

};
</script>

<style>
.nice{
  background-color: green;
}
</style>